<?php

namespace mbilling\BillingBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class OrdersVpsForm extends AbstractType
{
    protected $tarifs;
    protected $oss;

    public function __construct($tarifs, $oss)
    {
        $this->tarifs = $tarifs;
        $this->oss = $oss;
    }
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder->add('cpu', 'text');
        $builder->add('ram', 'text');
        $builder->add('hdd', 'text');
        $builder->add('comment', 'textarea', array('required' => false));
        $builder->add('dns_access', 'checkbox', array('required' => false));
        $builder->add('is_changed', 'checkbox', array('required' => false));
        $builder->add('order_id', 'text');
        $builder->add('vps_tarif', 'choice', array('choices' => $this->tarifs));
        $builder->add('os', 'choice', array('choices' => $this->oss));
        $builder->add('period', 'choice', array('choices' => array('0' => '0')));
        $builder->add('terms', 'checkbox');
        $builder->add('promocode', 'text', array('required' => false));
        $builder->add('is_shared', 'checkbox', array('required' => false));
        $builder->add('name', 'text', array('required' => false));
        $builder->add('ded_ip_count', 'text', array('required' => false));
    }
}